3.7 \(\int x^3 (a+b \tan (c+d x^2))^2 \, dx\)

Optimal. Leaf size=126 \[ \frac {a^2 x^4}{4}+\frac {i a b \text {Li}_2\left (-e^{2 i \left (d x^2+c\right )}\right )}{2 d^2}-\frac {a b x^2 \log \left (1+e^{2 i \left (c+d x^2\right )}\right )}{d}+\frac {1}{2} i a b x^4+\frac {b^2 \log \left (\cos \left (c+d x^2\right )\right )}{2 d^2}+\frac {b^2 x^2 \tan \left (c+d x^2\right )}{2 d}-\frac {b^2 x^4}{4} \]

[Out]

1/4*a^2*x^4+1/2*I*a*b*x^4-1/4*b^2*x^4-a*b*x^2*ln(1+exp(2*I*(d*x^2+c)))/d+1/2*b^2*ln(cos(d*x^2+c))/d^2+1/2*I*a*
b*polylog(2,-exp(2*I*(d*x^2+c)))/d^2+1/2*b^2*x^2*tan(d*x^2+c)/d

________________________________________________________________________________________

Rubi [A]  time = 0.24, antiderivative size = 126, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 9, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {3747, 3722, 3719, 2190, 2279, 2391, 3720, 3475, 30} \[ \frac {a^2 x^4}{4}+\frac {i a b \text {Li}_2\left (-e^{2 i \left (d x^2+c\right )}\right )}{2 d^2}-\frac {a b x^2 \log \left (1+e^{2 i \left (c+d x^2\right )}\right )}{d}+\frac {1}{2} i a b x^4+\frac {b^2 \log \left (\cos \left (c+d x^2\right )\right )}{2 d^2}+\frac {b^2 x^2 \tan \left (c+d x^2\right )}{2 d}-\frac {b^2 x^4}{4} \]

Antiderivative was successfully verified.

[In]

Int[x^3*(a + b*Tan[c + d*x^2])^2,x]

[Out]

(a^2*x^4)/4 + (I/2)*a*b*x^4 - (b^2*x^4)/4 - (a*b*x^2*Log[1 + E^((2*I)*(c + d*x^2))])/d + (b^2*Log[Cos[c + d*x^
2]])/(2*d^2) + ((I/2)*a*b*PolyLog[2, -E^((2*I)*(c + d*x^2))])/d^2 + (b^2*x^2*Tan[c + d*x^2])/(2*d)

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 2190

Int[(((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_.))/((a_) + (b_.)*((F_)^((g_.)*((e_.) +
 (f_.)*(x_))))^(n_.)), x_Symbol] :> Simp[((c + d*x)^m*Log[1 + (b*(F^(g*(e + f*x)))^n)/a])/(b*f*g*n*Log[F]), x]
 - Dist[(d*m)/(b*f*g*n*Log[F]), Int[(c + d*x)^(m - 1)*Log[1 + (b*(F^(g*(e + f*x)))^n)/a], x], x] /; FreeQ[{F,
a, b, c, d, e, f, g, n}, x] && IGtQ[m, 0]

Rule 2279

Int[Log[(a_) + (b_.)*((F_)^((e_.)*((c_.) + (d_.)*(x_))))^(n_.)], x_Symbol] :> Dist[1/(d*e*n*Log[F]), Subst[Int
[Log[a + b*x]/x, x], x, (F^(e*(c + d*x)))^n], x] /; FreeQ[{F, a, b, c, d, e, n}, x] && GtQ[a, 0]

Rule 2391

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> -Simp[PolyLog[2, -(c*e*x^n)]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 3475

Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[Log[RemoveContent[Cos[c + d*x], x]]/d, x] /; FreeQ[{c, d}, x]

Rule 3719

Int[((c_.) + (d_.)*(x_))^(m_.)*tan[(e_.) + (f_.)*(x_)], x_Symbol] :> Simp[(I*(c + d*x)^(m + 1))/(d*(m + 1)), x
] - Dist[2*I, Int[((c + d*x)^m*E^(2*I*(e + f*x)))/(1 + E^(2*I*(e + f*x))), x], x] /; FreeQ[{c, d, e, f}, x] &&
 IGtQ[m, 0]

Rule 3720

Int[((c_.) + (d_.)*(x_))^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(c + d*x)^m*(b*Tan[e
 + f*x])^(n - 1))/(f*(n - 1)), x] + (-Dist[(b*d*m)/(f*(n - 1)), Int[(c + d*x)^(m - 1)*(b*Tan[e + f*x])^(n - 1)
, x], x] - Dist[b^2, Int[(c + d*x)^m*(b*Tan[e + f*x])^(n - 2), x], x]) /; FreeQ[{b, c, d, e, f}, x] && GtQ[n,
1] && GtQ[m, 0]

Rule 3722

Int[((c_.) + (d_.)*(x_))^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Int[ExpandIntegrand[
(c + d*x)^m, (a + b*Tan[e + f*x])^n, x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[m, 0] && IGtQ[n, 0]

Rule 3747

Int[(x_)^(m_.)*((a_.) + (b_.)*Tan[(c_.) + (d_.)*(x_)^(n_)])^(p_.), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplif
y[(m + 1)/n] - 1)*(a + b*Tan[c + d*x])^p, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p}, x] && IGtQ[Simplify[
(m + 1)/n], 0] && IntegerQ[p]

Rubi steps

\begin {align*} \int x^3 \left (a+b \tan \left (c+d x^2\right )\right )^2 \, dx &=\frac {1}{2} \operatorname {Subst}\left (\int x (a+b \tan (c+d x))^2 \, dx,x,x^2\right )\\ &=\frac {1}{2} \operatorname {Subst}\left (\int \left (a^2 x+2 a b x \tan (c+d x)+b^2 x \tan ^2(c+d x)\right ) \, dx,x,x^2\right )\\ &=\frac {a^2 x^4}{4}+(a b) \operatorname {Subst}\left (\int x \tan (c+d x) \, dx,x,x^2\right )+\frac {1}{2} b^2 \operatorname {Subst}\left (\int x \tan ^2(c+d x) \, dx,x,x^2\right )\\ &=\frac {a^2 x^4}{4}+\frac {1}{2} i a b x^4+\frac {b^2 x^2 \tan \left (c+d x^2\right )}{2 d}-(2 i a b) \operatorname {Subst}\left (\int \frac {e^{2 i (c+d x)} x}{1+e^{2 i (c+d x)}} \, dx,x,x^2\right )-\frac {1}{2} b^2 \operatorname {Subst}\left (\int x \, dx,x,x^2\right )-\frac {b^2 \operatorname {Subst}\left (\int \tan (c+d x) \, dx,x,x^2\right )}{2 d}\\ &=\frac {a^2 x^4}{4}+\frac {1}{2} i a b x^4-\frac {b^2 x^4}{4}-\frac {a b x^2 \log \left (1+e^{2 i \left (c+d x^2\right )}\right )}{d}+\frac {b^2 \log \left (\cos \left (c+d x^2\right )\right )}{2 d^2}+\frac {b^2 x^2 \tan \left (c+d x^2\right )}{2 d}+\frac {(a b) \operatorname {Subst}\left (\int \log \left (1+e^{2 i (c+d x)}\right ) \, dx,x,x^2\right )}{d}\\ &=\frac {a^2 x^4}{4}+\frac {1}{2} i a b x^4-\frac {b^2 x^4}{4}-\frac {a b x^2 \log \left (1+e^{2 i \left (c+d x^2\right )}\right )}{d}+\frac {b^2 \log \left (\cos \left (c+d x^2\right )\right )}{2 d^2}+\frac {b^2 x^2 \tan \left (c+d x^2\right )}{2 d}-\frac {(i a b) \operatorname {Subst}\left (\int \frac {\log (1+x)}{x} \, dx,x,e^{2 i \left (c+d x^2\right )}\right )}{2 d^2}\\ &=\frac {a^2 x^4}{4}+\frac {1}{2} i a b x^4-\frac {b^2 x^4}{4}-\frac {a b x^2 \log \left (1+e^{2 i \left (c+d x^2\right )}\right )}{d}+\frac {b^2 \log \left (\cos \left (c+d x^2\right )\right )}{2 d^2}+\frac {i a b \text {Li}_2\left (-e^{2 i \left (c+d x^2\right )}\right )}{2 d^2}+\frac {b^2 x^2 \tan \left (c+d x^2\right )}{2 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [B]  time = 6.55, size = 295, normalized size = 2.34 \[ \frac {1}{4} x^4 \sec (c) \left (a^2 \cos (c)+2 a b \sin (c)-b^2 \cos (c)\right )-\frac {a b \csc (c) \sec (c) \left (d^2 x^4 e^{-i \tan ^{-1}(\cot (c))}-\frac {\cot (c) \left (i \text {Li}_2\left (e^{2 i \left (d x^2-\tan ^{-1}(\cot (c))\right )}\right )+i d x^2 \left (-2 \tan ^{-1}(\cot (c))-\pi \right )-2 \left (d x^2-\tan ^{-1}(\cot (c))\right ) \log \left (1-e^{2 i \left (d x^2-\tan ^{-1}(\cot (c))\right )}\right )-2 \tan ^{-1}(\cot (c)) \log \left (\sin \left (d x^2-\tan ^{-1}(\cot (c))\right )\right )-\pi \log \left (1+e^{-2 i d x^2}\right )+\pi \log \left (\cos \left (d x^2\right )\right )\right )}{\sqrt {\cot ^2(c)+1}}\right )}{2 d^2 \sqrt {\csc ^2(c) \left (\sin ^2(c)+\cos ^2(c)\right )}}+\frac {b^2 \sec (c) \left (d x^2 \sin (c)+\cos (c) \log \left (\cos (c) \cos \left (d x^2\right )-\sin (c) \sin \left (d x^2\right )\right )\right )}{2 d^2 \left (\sin ^2(c)+\cos ^2(c)\right )}+\frac {b^2 x^2 \sec (c) \sin \left (d x^2\right ) \sec \left (c+d x^2\right )}{2 d} \]

Warning: Unable to verify antiderivative.

[In]

Integrate[x^3*(a + b*Tan[c + d*x^2])^2,x]

[Out]

(x^4*Sec[c]*(a^2*Cos[c] - b^2*Cos[c] + 2*a*b*Sin[c]))/4 + (b^2*Sec[c]*(Cos[c]*Log[Cos[c]*Cos[d*x^2] - Sin[c]*S
in[d*x^2]] + d*x^2*Sin[c]))/(2*d^2*(Cos[c]^2 + Sin[c]^2)) - (a*b*Csc[c]*((d^2*x^4)/E^(I*ArcTan[Cot[c]]) - (Cot
[c]*(I*d*x^2*(-Pi - 2*ArcTan[Cot[c]]) - Pi*Log[1 + E^((-2*I)*d*x^2)] - 2*(d*x^2 - ArcTan[Cot[c]])*Log[1 - E^((
2*I)*(d*x^2 - ArcTan[Cot[c]]))] + Pi*Log[Cos[d*x^2]] - 2*ArcTan[Cot[c]]*Log[Sin[d*x^2 - ArcTan[Cot[c]]]] + I*P
olyLog[2, E^((2*I)*(d*x^2 - ArcTan[Cot[c]]))]))/Sqrt[1 + Cot[c]^2])*Sec[c])/(2*d^2*Sqrt[Csc[c]^2*(Cos[c]^2 + S
in[c]^2)]) + (b^2*x^2*Sec[c]*Sec[c + d*x^2]*Sin[d*x^2])/(2*d)

________________________________________________________________________________________

fricas [A]  time = 0.58, size = 199, normalized size = 1.58 \[ \frac {{\left (a^{2} - b^{2}\right )} d^{2} x^{4} + 2 \, b^{2} d x^{2} \tan \left (d x^{2} + c\right ) - i \, a b {\rm Li}_2\left (\frac {2 \, {\left (i \, \tan \left (d x^{2} + c\right ) - 1\right )}}{\tan \left (d x^{2} + c\right )^{2} + 1} + 1\right ) + i \, a b {\rm Li}_2\left (\frac {2 \, {\left (-i \, \tan \left (d x^{2} + c\right ) - 1\right )}}{\tan \left (d x^{2} + c\right )^{2} + 1} + 1\right ) - {\left (2 \, a b d x^{2} - b^{2}\right )} \log \left (-\frac {2 \, {\left (i \, \tan \left (d x^{2} + c\right ) - 1\right )}}{\tan \left (d x^{2} + c\right )^{2} + 1}\right ) - {\left (2 \, a b d x^{2} - b^{2}\right )} \log \left (-\frac {2 \, {\left (-i \, \tan \left (d x^{2} + c\right ) - 1\right )}}{\tan \left (d x^{2} + c\right )^{2} + 1}\right )}{4 \, d^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^3*(a+b*tan(d*x^2+c))^2,x, algorithm="fricas")

[Out]

1/4*((a^2 - b^2)*d^2*x^4 + 2*b^2*d*x^2*tan(d*x^2 + c) - I*a*b*dilog(2*(I*tan(d*x^2 + c) - 1)/(tan(d*x^2 + c)^2
 + 1) + 1) + I*a*b*dilog(2*(-I*tan(d*x^2 + c) - 1)/(tan(d*x^2 + c)^2 + 1) + 1) - (2*a*b*d*x^2 - b^2)*log(-2*(I
*tan(d*x^2 + c) - 1)/(tan(d*x^2 + c)^2 + 1)) - (2*a*b*d*x^2 - b^2)*log(-2*(-I*tan(d*x^2 + c) - 1)/(tan(d*x^2 +
 c)^2 + 1)))/d^2

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (b \tan \left (d x^{2} + c\right ) + a\right )}^{2} x^{3}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^3*(a+b*tan(d*x^2+c))^2,x, algorithm="giac")

[Out]

integrate((b*tan(d*x^2 + c) + a)^2*x^3, x)

________________________________________________________________________________________

maple [F]  time = 0.92, size = 0, normalized size = 0.00 \[ \int x^{3} \left (a +b \tan \left (d \,x^{2}+c \right )\right )^{2}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^3*(a+b*tan(d*x^2+c))^2,x)

[Out]

int(x^3*(a+b*tan(d*x^2+c))^2,x)

________________________________________________________________________________________

maxima [B]  time = 1.67, size = 398, normalized size = 3.16 \[ \frac {1}{4} \, a^{2} x^{4} + \frac {{\left (2 \, a b + i \, b^{2}\right )} d^{2} x^{4} - {\left (4 \, a b d x^{2} - 2 \, b^{2} + 2 \, {\left (2 \, a b d x^{2} - b^{2}\right )} \cos \left (2 \, d x^{2} + 2 \, c\right ) + {\left (4 i \, a b d x^{2} - 2 i \, b^{2}\right )} \sin \left (2 \, d x^{2} + 2 \, c\right )\right )} \arctan \left (\sin \left (2 \, d x^{2} + 2 \, c\right ), \cos \left (2 \, d x^{2} + 2 \, c\right ) + 1\right ) + {\left ({\left (2 \, a b + i \, b^{2}\right )} d^{2} x^{4} - 4 \, b^{2} d x^{2}\right )} \cos \left (2 \, d x^{2} + 2 \, c\right ) + 2 \, {\left (a b \cos \left (2 \, d x^{2} + 2 \, c\right ) + i \, a b \sin \left (2 \, d x^{2} + 2 \, c\right ) + a b\right )} {\rm Li}_2\left (-e^{\left (2 i \, d x^{2} + 2 i \, c\right )}\right ) - {\left (-2 i \, a b d x^{2} + i \, b^{2} + {\left (-2 i \, a b d x^{2} + i \, b^{2}\right )} \cos \left (2 \, d x^{2} + 2 \, c\right ) + {\left (2 \, a b d x^{2} - b^{2}\right )} \sin \left (2 \, d x^{2} + 2 \, c\right )\right )} \log \left (\cos \left (2 \, d x^{2} + 2 \, c\right )^{2} + \sin \left (2 \, d x^{2} + 2 \, c\right )^{2} + 2 \, \cos \left (2 \, d x^{2} + 2 \, c\right ) + 1\right ) - {\left ({\left (-2 i \, a b + b^{2}\right )} d^{2} x^{4} + 4 i \, b^{2} d x^{2}\right )} \sin \left (2 \, d x^{2} + 2 \, c\right )}{-4 i \, d^{2} \cos \left (2 \, d x^{2} + 2 \, c\right ) + 4 \, d^{2} \sin \left (2 \, d x^{2} + 2 \, c\right ) - 4 i \, d^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^3*(a+b*tan(d*x^2+c))^2,x, algorithm="maxima")

[Out]

1/4*a^2*x^4 + ((2*a*b + I*b^2)*d^2*x^4 - (4*a*b*d*x^2 - 2*b^2 + 2*(2*a*b*d*x^2 - b^2)*cos(2*d*x^2 + 2*c) + (4*
I*a*b*d*x^2 - 2*I*b^2)*sin(2*d*x^2 + 2*c))*arctan2(sin(2*d*x^2 + 2*c), cos(2*d*x^2 + 2*c) + 1) + ((2*a*b + I*b
^2)*d^2*x^4 - 4*b^2*d*x^2)*cos(2*d*x^2 + 2*c) + 2*(a*b*cos(2*d*x^2 + 2*c) + I*a*b*sin(2*d*x^2 + 2*c) + a*b)*di
log(-e^(2*I*d*x^2 + 2*I*c)) - (-2*I*a*b*d*x^2 + I*b^2 + (-2*I*a*b*d*x^2 + I*b^2)*cos(2*d*x^2 + 2*c) + (2*a*b*d
*x^2 - b^2)*sin(2*d*x^2 + 2*c))*log(cos(2*d*x^2 + 2*c)^2 + sin(2*d*x^2 + 2*c)^2 + 2*cos(2*d*x^2 + 2*c) + 1) -
((-2*I*a*b + b^2)*d^2*x^4 + 4*I*b^2*d*x^2)*sin(2*d*x^2 + 2*c))/(-4*I*d^2*cos(2*d*x^2 + 2*c) + 4*d^2*sin(2*d*x^
2 + 2*c) - 4*I*d^2)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \[ \int x^3\,{\left (a+b\,\mathrm {tan}\left (d\,x^2+c\right )\right )}^2 \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^3*(a + b*tan(c + d*x^2))^2,x)

[Out]

int(x^3*(a + b*tan(c + d*x^2))^2, x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int x^{3} \left (a + b \tan {\left (c + d x^{2} \right )}\right )^{2}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**3*(a+b*tan(d*x**2+c))**2,x)

[Out]

Integral(x**3*(a + b*tan(c + d*x**2))**2, x)

________________________________________________________________________________________